#include<stdio.h>
int main(void){
    int num[4];
    int n=0;
    while(n<4){
        scanf("%d",num+n);
        n++;
    }
    int judge;
    for(int i=0;i<3;i++){
        judge = 0;
        for(int j=0;j<3-i;j++){
            if(num[j]>num[j+1]){
                num[j] = num[j]+num[j+1];
                num[j+1] = num[j]-num[j+1];
                num[j] = num[j]-num[j+1];
                judge = 1;
            }
            if(judge==0){
                break;
            }
        }
    }
    for(n=0;n<4;n++){
        printf("%d ",num[n]);
    }
    return 0;
}